package com.common.enums;

public enum AppHttpCodeEnum {
    // 成功
    SUCCESS(200,"操作成功"),
    // 登录
    NEED_LOGIN(401,"需要登录后操作"),
    STATUS_EX(402,"账号已被停用，请联系管理员"),
    NO_OPERATOR_AUTH(403,"无权限操作"),
    SYSTEM_ERROR(500,"出现错误"),
    USERNAME_EXIST(501,"用户名已存在"),
     PHONENUMBER_EXIST(502,"手机号已存在"),
    EMAIL_EXIST(503, "邮箱已存在"),
    NICKNAME_EXIST(513, "昵称已存在"),
    REQUIRE_USERNAME(504, "必需填写用户名"),
    LOGIN_ERROR(505,"用户名或密码错误"),
    FILE_TYPE_ERROR(507, "文件类型错误，请上传png，jpg文件"),
    COMMENT_NOT_NULL(506,"内容不能为空"),
    ERROR_USERID(508,"只能修改自己用户信息"),
    USERNAME_NOT_NULL(509,"用户名不能为空"),
    NICKNAME_NOT_NULL(510,"用户昵称不能为空"),
    EMAIL_NOT_NULL(511,"邮箱不能为空"),
    PASS_NOT_NULL(512,"密码不能为空"),
    TAG_NAME_NULL(513,"标签名称不能为空"),
    PARENT_ID_EQUAL(514,"上级菜单不能是本身菜单"),
    CHILDREN_NOT_NULL(515,"存在子菜单，不能删除"),
    VALIDATION_ERROR(516,"参数校验失败"),
    OTHER_REQUESTS_ERROR(517,"请求频繁"),
    GOODS_ERROR(518,"商品信息不存在"),
    PASSWORD_ERROR(519,"原密码输入错误，请重新输入"),
    MAXIMUM_NUMBER(520,"当前预约时间段人数达到上限，请重新选择"),
    REPEAT_ERROR(521,"不能重复评价"),
    VALID_CODE_ERROR(521,"验证码输入错误"),
    VOLUNTEER_ERROR(522,"活动不存在"),
    VOLUNTEER_NUMBER_ERROR(522,"活动不存在");
    int code;
    String msg;

    AppHttpCodeEnum(int code, String errorMessage){
        this.code = code;
        this.msg = errorMessage;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
